<% extend 'shared/admin-base' %>
<% block 'head': %>
<link rel="stylesheet" href="/dist/admin-shops-ctrl.css"/>
<% end %>
<div class="container">
    <div class="row">
        <div class="col-md-2 col-md-pull-2">
            <div class="title-info"><i class="fa fa-users"></i> 商店列表</div>
        </div>
    </div>
</div>
<div class="alert alert-sm alert-info alert-dismissible ">
    <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
            aria-hidden="true">&times;</span></button>
    若商店仍有管理员，则商店不可以删除
</div>


<div class="row" ng-controller="AppCtrl">
    <div class="col-md-12">
        <div class="portlet ">
            <div class="portlet-body">
                <div ng-view></div>
                <div ng-bind-html="test"></div>
                <div simple-datatable ng-model="list" sdt-action-col="actionColFactory" sdt-on="sdtOn">
                    <div class="row" style="margin-top: 20px; margin-bottom: 20px;">

                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <table class="table table-striped table-hover table-bordered">
                                <thead>
                                <tr>
                                    <th data-sdt-col="id">商店编号</th>
                                    <th data-sdt-col="mainImg" >商店图片</th>
                                    <th data-sdt-col="title">商店标题</th>
                                    <th data-sdt-col="Adminers.length">管理员数量</th>
                                    <th style="width: 180px;"></th>
                                </tr>
                                </thead>
                                <tbody>
                                </tbody>
                            </table>
                            <div class="clearfix text-center">
                                <span class="pull-left">共<span sdt-total-label></span> 第<span sdt-page></span>/<span
                                        sdt-total-page></span>页</span>
                                <div style="width: 160px; display: inline-block;">
                                    <div class="input-group">
                                        <input type="text" class="form-control" sdt-page-input >
                                        <span class="input-group-addon">/<span sdt-total-page></span></span>
                                        <span class="input-group-addon" sdt-page-btn><i class="fa fa-angle-right"></i></span>
                                    </div>
                                </div>

                                <div class="btn-group pull-right" role="group" aria-label="...">
                                    <button type="button" class="btn btn-sm btn-default" sdt-prev-btn>上一页</button>
                                    <button type="button" class="btn btn-sm btn-default" sdt-next-btn>下一页</button>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/x-handlebars-template" id="row-btn">
    <td>
        <div class="btn-group dropup btn-group-sm">
            <!--<button type="button" class="btn btn-success" sdt-row-click="look">查看</button>-->
            <a class="btn btn-default" href="/adminer/shop-info/{{row.id}}">编辑</a>
            <button type="button" class="btn btn-warning" sdt-row-click="remove, del">删除</button>
        </div>
    </td>
</script>

<% block 'scripts': %>
<script src="/dist/admin-shops-ctrl.js"></script>
<% end %>
